package com.example.data.factory.common.Dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;

@Data
public class InsertDataStandardDto {
    @ApiModelProperty(value = "中文名称", required = true)
    @Pattern(regexp = "^[\\u4E00-\\u9FA5A-Za-z]+$", message = "只能包含中文字符或大小写英文")
    private String chineseName;

    @ApiModelProperty(value = "英文名称",required = true)
    @Pattern(regexp = "^[A-Za-z][A-Za-z0-9_]*$", message = "英文名称只能以字母开头，后面可以跟字母、数字或下划线")
    private String englishName;

    @ApiModelProperty("标准说明")
    private String description;

    @ApiModelProperty(value = "来源机构",required = true)
    private String institution;

    @ApiModelProperty(value = "数据类型（String、Int、Float、Enum）",required = true)
    private String dataType;

    @ApiModelProperty("默认值")
    private String value;

    @ApiModelProperty("最小值")
    private Double min;

    @ApiModelProperty("最大值")
    private Double max;

    @ApiModelProperty("字符串最大长度")
    private Integer length;

    @ApiModelProperty("数据精度")
    private Double dataAccuracy;

    @ApiModelProperty("Y-不为空，N-为空")
    private String notNull;

    @ApiModelProperty("码表名称")
    private String dictName;

}
